<html>
    <head>
        <title><g:layoutTitle default="Grails" /></title>
        <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        
        <g:javascript library="jquery"/>
        <g:javascript library="application" />
        <g:layoutHead />				
    </head>
    <body>
        <div id="spinner" class="spinner" style="display:none;">
            <img src="${resource(dir:'images',file:'spinner.gif')}" alt="Spinner" />
        </div>	
        <div class="logo"><img src="${resource(dir:'images',file:'grails_logo.jpg')}" alt="Grails" /></div>
            <g:if test="${controllerName != 'autenticate'}">
		        <g:if test="${session.user == null}">
		        	<g:link class="headerLink registerLink" controller="user" action="create">REGISTER</g:link>
		       		<g:link class="headerLink" controller="autenticate" action="show">LOGIN</g:link>
		        </g:if>
		        <g:else>
		        	<g:link class="headerLink profileLink" controller="user" action="show" params="${[id:session.user.id]}">YOUR PROFILE</g:link>
		        	<g:link class="headerLink" controller="autenticate" action="logout">LOGOUT</g:link>
		        </g:else>
	        </g:if>
        <g:layoutBody />		
    </body>	
</html>